﻿// <copyright file="BloodlineStrengthsPlayer.cs" company="Gravity Age Studios">
// Code released under the MIT license (see License.txt).
// </copyright>
// <author>Vicente Cartas Espinel</author>
// <email>vicente.cartas@gmail.com</email>
namespace LightSwitchApplication
{
    using System;
    using System.Windows.Controls;
    using Microsoft.LightSwitch.Presentation;
    using Microsoft.LightSwitch.Presentation.Extensions;

    public partial class BloodlineStrengthsPlayer
    {
        #region View BloodlineStrength

        partial void ViewDetails_CanExecute(ref bool result)
        {
            result = this.Collection.SelectedItem != null &&
                     this.Collection.SelectedItem.HasPublicInformation == true;
        }

        partial void ViewDetails_Execute()
        {
            this.FindControl("ModalWindow").DisplayName = string.Format("View {0} details", this.Collection.SelectedItem.Name);
            this.OpenModalWindow("ModalWindow");
        }

        partial void SubmitModalWindow_Execute()
        {
            this.CloseModalWindow("ModalWindow");
        }

        #endregion
    }
}
